// Copyright (c) 2009 Hypirinha contributers
// This program is made available under the terms of the MIT License.
package org.hypirinha.html.output.features;

import org.hypirinha.html.output.PrintAdapter;

import java.io.PrintWriter;

public enum XmlDeclaration implements PrintAdapter.Feature {

    include {
        public void print(PrintWriter writer, Encoding encoding) {
            writer.println("<?xml version=\"1.0\" encoding=\"" + encoding.getCharset().name() + "\"?>");
        }
    },
    omit {
        public void print(PrintWriter writer, Encoding encoding) {
        }
    };

    public abstract void print(PrintWriter writer, Encoding encoding);
}